﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ZarzadzaniePersonelem.aspx.cs"    %>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Lista Pracowników</h2>
    <asp:EntityDataSource ID="ListaPracowników" runat="server"  
        ConnectionString="name=DentistEntities" DefaultContainerName="DentistEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="Employees">
    </asp:EntityDataSource>
    
   
    <asp:GridView ID="ListaPracownikow" runat="server" AllowPaging="True" PageSize="1" AutoGenerateEditButton="true"
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="id" 
        DataSourceID="ListaPracowników" EmptyDataText="Nie znaleziono danych" >
        <PagerStyle HorizontalAlign="Left" />
        <PagerSettings Position="TopAndBottom" 
         FirstPageText = "Przejdz do pierwszej strony"
         LastPageText = "Przejdz do ostatniej strony"
         Mode = "NextPreviousFirstLast">
         </PagerSettings>
        <Columns>
            <asp:BoundField DataField="id" HeaderText="id" SortExpression="id" 
                ReadOnly="True" />
            <asp:BoundField DataField="name" HeaderText="Imię" 
                SortExpression="name" /> 
            <asp:BoundField DataField="surname" HeaderText="Nazwisko" 
                SortExpression="surname" />
            <asp:BoundField DataField="salary" HeaderText="Płaca" 
                SortExpression="salary" />
            <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
            
        </Columns>
        
    </asp:GridView>
    <br /><br />
    <h2>Informacje szczegółówe o pracowniku</h2>
    <asp:DetailsView ID="listaPra" runat="server" Height="50px" Width="125px" 
        AutoGenerateRows="False" DataKeyNames="id" DataSourceID="ListaPracowników" AllowPaging="true">
        <Fields>
            <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" 
                SortExpression="id" />
            <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
            <asp:BoundField DataField="surname" HeaderText="surname" 
                SortExpression="surname" />
            <asp:BoundField DataField="login" HeaderText="login" SortExpression="login" />
            <asp:BoundField DataField="password" HeaderText="password" 
                SortExpression="password" />
            <asp:BoundField DataField="salary" HeaderText="salary" 
                SortExpression="salary" />
            <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
            <asp:BoundField DataField="cityCode" HeaderText="cityCode" 
                SortExpression="cityCode" />
            <asp:BoundField DataField="street" HeaderText="street" 
                SortExpression="street" />
            <asp:BoundField DataField="positionId" HeaderText="positionId" 
                SortExpression="positionId" />
        </Fields>
    </asp:DetailsView>


    </asp:Content>
